<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <title>乐购-确认订单</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="/css/see/reset.min.css">
    <link rel="stylesheet" href="/css/purchase/confirmOrder.min.css?v=<%=$version%>">
</head>
<body>
<div id="confirmOrder" v-cloak>
    <header class="discount-header">
        <span class="goback" @click="getIsScreen(4)"></span>
        确认订单
    </header>
    <div class="confirmOrder-address" v-if="address&&address.address">
        <div class="address-bg"></div>
        <div class="address-cent">
            <h6>
                <span class="default-icon" v-if="address&&address.isDefault==1">默认</span>
                <span class="address-name">{{address.consignee}}</span>{{address.phone}}</h6>
            <p>{{address.address}}</p>
            <strong class="address-left" @click="getNext(1)"></strong>
        </div>
    </div>
    <div class="confirmOrder-address" v-else>
        <div class="address-bg"></div>
        <div class="address-cent">
            <h6>请选择地址</h6>
            <strong class="address-left" @click="getNext(1)"></strong>
        </div>
    </div>
    <div class="confirmOrder-cent">
        <div class="confirmOrder-centList" v-for="(item,index) in preorderList.list">
            <div class="centList-title">
                <template v-if="item.mediaUserId==0">
                    <span>{{item.name}}</span>
                </template>
                <template v-else>
                    <strong :style="bgimg(item.headImg)"></strong>{{item.name}}
                </template>
            </div>
            <div class="confirmOrder-listCent">
                <div class="centList-cent clearfix" v-for="(list,ins) in item.products">
                    <div class="centList-centCent">
                        <div class="centList-centImg" :style="bgimg(list.imgSrc)">
                            <span class="shoppingCart-icon1" v-if="list.activityType==3"></span>
                            <span class="shoppingCart-icon2" v-if="list.activityType==2"></span>
                            <span class="shoppingCart-icon3" v-if="list.activityType==1"></span>
                            <strong class="overtime" v-if="list.activityType!=null&&compareDate(list)<0"></strong>
                        </div>
                        <div class="centList-centRight">
                        <h6 class="clearfix">{{list.title}}<span class="centRight-h6"><span>×</span>{{list.number}}</span></h6>
                        <p v-if="list.activityType==3">{{list.colorName}}<span></span>当前<strong>9.0</strong>折</p>
                        <p v-else>{{list.colorName}}<i v-if="list.colorName">&nbsp;</i>{{list.specName}}</p>
                        <div class="happyi-mon"><span>&yen;</span>{{list.integral}}</div>
                    </div>
                    </div>
<!--                    <p class="centList-describe" v-if="list.activityType==3">折扣商品请在当天22:00点前付款</p>
                    <p class="centList-describe" v-if="list.activityType==2">秒杀商品请在1小时内完成付款</p>
                    <p class="centList-describe" v-if="list.activityType==1">爆款商品请在1小时内完成付款</p>
                    <div class="centList-data" :class="{'centList-data1':list.activityType!=null&&compareDate(list)<0}">
                        <span class="centList-Btn" v-if="list.isStorage==1" @click="getIsScreen(1,list)">存入储物箱</span>
                        <span class="centList-Btnactive" v-if="list.isStorage==0" @click="getCartIsStorage(list)"><span>✔&nbsp;存入储物箱</span></span>
                        <p v-if="list.activityType!=null&&compareDate(list)>0">剩余<span :id="'data'+index+ins">{{leftTimer(list,index,ins)}}</span></p>
                    </div>-->
                    <div class="centList-butt" v-if="list.couponCount!=0">
                        <span class="centList-buttLeft" :class="{'centList-buttLeft1':list.couponId}" @click="getPreorder(3,list)">优惠券</span>
                        <span class="centList-buttCent">可用折扣券{{list.couponCount}}张</span>
                        <strong class="centList-buttRight" @click="getMyCouponsByProductId(list)"></strong>
                        <!--<strong v-if="item.mediaFreightIntegral==0">免运费</strong><span v-else>{{item.mediaFreightIntegral}}</span>-->
                    </div>
                    <div class="goods-total" @click="getPreorder(2,list)">
                        <span class="centList-buttLeft" :class="{'centList-buttLeft1':list.isIntegral==1}">乐币</span>
                        <span class="goods-totalCent">你当前共有<span>{{preorderList.userIntegral}}</span>乐币<template v-if="list.offsetCoin">，<span>可抵{{list.offsetCoin}}</span></template></span>
                        <!--<strong class="goods-totalRight"></strong>-->
                        <!--商品合计<span>{{preorderList.productIntegral}}</span>-->

                    </div>
                </div>
            </div>

        </div>

        <!--<div class="freight-total">-->
            <!--运费合计<span>{{preorderList.freightIntegral}}</span>-->
        <!--</div>-->
    </div>
    <div class="confirmOrder-footer">
        <span class="footer-money">&yen;{{preorderList.countegral}}</span>
        <div class="footer-money1">
            <p>总额：<span>&yen;{{preorderList.productIntegral}}</span></p>
            <p>立减：<span>&yen;{{preorderList.countOffsetCoin}}</span></p>
        </div>
        <strong class="footer-btn" @click="saveOrder()">提交订单</strong>
    </div>
    <div id="mask" :class="{'maskShow':isScreen}"></div>
    <div id="storageBox" :class="{'maskShow':isScreen==1}">
        <h6 class="storageBox-title">
            <span>存入储物箱</span>
        </h6>
        <div class="storageBox clearfix">
            <div class="storageBox-left">
                <strong :style="bgimg(imgSrc)"></strong>
                <span><span>×</span>{{number}}</span>
            </div>
            <div class="storageBox-cent"></div>
            <div class="storageBox-right">
                <strong class="storageBox-rightImg" :style="bgimg(imgSrc)"></strong>
                <strong class="storageBox-rightbg"></strong>
                <span>{{number}}</span>
            </div>
        </div>
        <div class="storageBox-Btn clearfix">
            <span @click="getIsScreen()">取消</span>
            <span class="btnOK" @click="getCartIsStorage()">确定</span>
        </div>
    </div>
    <div id="confirmPayment" :class="{'maskShow':isScreen==2}">
        <h6 class="confirmPayment-title">
            确认付款<span @click="getBack()"></span>
        </h6>
        <div class="confirmPayment-countegral">
            <strong v-if="offsetCoin">{{offsetCoin}}</strong>
            <span v-else>&yen;{{orderInfo.allIntegral}}</span>
        </div>
        <div class="confirmPayment-user clearfix">
            支付用户<strong :style="bgimg(userInfo.headImg)"></strong><span>{{userInfo.name}}</span>
        </div>
        <div class="confirmPayment-balance clearfix" v-if="offsetCoin">
            账号余额<strong v-if="userInfo.integral<offsetCoin">余额不足</strong><span>{{preorderList.userIntegral}}</span>
        </div>
        <div class="confirmPayment-btn" v-if="offsetCoin&&userInfo.integral<orderInfo.allIntegral">去充值</div>
        <div class="confirmPayment-btn1" v-else @click="payOrder()">支付</div>
    </div>
    <div id="colseInvalid" :class="{'maskShow':isScreen==3}">
        <h6 class="colseInvalid-title">抱歉，恁本单购买的以下商品因付款超时已无法购买</h6>
        <div class="colseInvalid-cent">
            <div class="colseInvalid-list" v-for="list in InvalidList">
                <div class="centList-centImg">
                    <span class="shoppingCart-icon1" v-if="list.activityType==3"></span>
                    <span class="shoppingCart-icon2" v-if="list.activityType==2"></span>
                    <span class="shoppingCart-icon3" v-if="list.activityType==1"></span>
                    <strong class="overtime"></strong>
                </div>
                <div class="centList-centRight">
                    <h6 class="clearfix">{{list.title}}<span class="centRight-h6"><span>×</span>{{list.number}}</span></h6>
                    <p v-if="list.activityType==3">{{list.colorName}}<span></span>当前<strong>9.0</strong>折</p>
                    <p v-else>{{list.colorName}}<i v-if="list.colorName">&nbsp;</i>{{list.specName}}</p>
                    <div class="happyi-mon">{{list.integral}}</div>
                </div>
            </div>
        </div>
        <div class="colseInvalid-butt clearfix">
            <span @click="getBack()">返回购物车</span>
            <span class="btn" @click="deleteCartByid()">移除无效商品</span>
        </div>
    </div>
    <div id="leaveTips" :class="{'maskShow':isScreen==4}">
       <h6>确认离开吗? </h6>
       <div class="clearfix">
           <span class="leaveTips-btn" @click="getBack()">确认离开</span>
           <span @click="getIsScreen()">我在想想</span>
       </div>
    </div>
    <div id="voucher" :class="{'maskShow':isScreen==5}">
        <h6 class="confirmPayment-title">
            <strong class="goods-totalRight"></strong>
            优惠券<span @click="getIsScreen()"></span>
        </h6>
        <div class="voucher-cent">
            <div class="coupon-list" v-for="item in myCoupons" @click="getPreorder(1,item)">
                <strong class="coupon-lableIcon"></strong>
                <strong class="coupon-txt">{{item.discount}}折</strong>
                <strong class="slide-img" :style="bgimg(item.imgSrc)"></strong>
                <h6>{{item.title}}</h6>
                <span class="purchase-icon2"></span>
                <p>{{item.beginTime}}-{{item.endTime}}</p>
            </div>
        </div>
    </div>
    <prompt-view ref="prompt"></prompt-view>
</div>
<script src='/plugins/js/jquery-1.11.3.min.js'></script>
<script type="text/javascript" src="/plugins/js/vue.min.js"></script>
<script type="text/javascript" src="/js/purchase/confirmOrder.js?v=<%=$version%>"></script>

</body>
</html>